home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / OSEvents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  1.5 KB  |  71 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Friday, September 13, 1991 at 1:05 PM
  5.  OSEvents.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1985-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __OSEVENTS__
  16. #define __OSEVENTS__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22. #ifndef __EVENTS__
  23. #include <Events.h>
  24. #endif
  25.  
  26. #ifndef __OSUTILS__
  27. #include <OSUtils.h>
  28. #endif
  29.  
  30.  
  31. struct EvQEl {
  32.  QElemPtr qLink;
  33.  short qType;
  34.  short evtQWhat;    /*this part is identical to the EventRecord as...*/
  35.  long evtQMessage;    /*defined in ToolIntf*/
  36.  long evtQWhen;
  37.  Point evtQWhere;
  38.  short evtQModifiers;
  39. };
  40.  
  41. typedef struct EvQEl EvQEl;
  42. typedef EvQEl *EvQElPtr;
  43.  
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48. #pragma parameter __D0 PostEvent(__A0,__D0)
  49. pascal OSErr PostEvent(short eventNum,long eventMsg)
  50.  = 0xA02F; 
  51. #pragma parameter __D0 PPostEvent(__A0,__D0,__A1)
  52. pascal OSErr PPostEvent(short eventCode,long eventMsg,EvQElPtr *qEl)
  53.  = {0xA12F,0x2288}; 
  54. #pragma parameter __D0 OSEventAvail(__D0,__A0)
  55. pascal Boolean OSEventAvail(short mask,EventRecord *theEvent)
  56.  = {0xA030,0x5240}; 
  57. #pragma parameter __D0 GetOSEvent(__D0,__A0)
  58. pascal Boolean GetOSEvent(short mask,EventRecord *theEvent)
  59.  = {0xA031,0x5240}; 
  60. pascal void FlushEvents(short whichMask,short stopMask)
  61.  = {0x201F,0xA032}; 
  62. #pragma parameter SetEventMask(__D0)
  63. pascal void SetEventMask(short theMask)
  64.  = {0x31C0,0x0144}; 
  65. #define GetEvQHdr() ((QHdrPtr) 0x014A)
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69.  
  70. #endif
  71.